package kr.hkit.androidcomplete02.ch01;

import java.util.ArrayList;

import kr.hkit.androidcomplete02.R;
import kr.hkit.androidcomplete02.ch01.CustomAdapterView.MyItem;
import kr.hkit.androidcomplete02.ch01.CustomAdapterView.MyListAdapter;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

public class CustomAdapterView02 extends Activity {

	ArrayList<MyMenu> arLists;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.list_view_test);
		
		arLists = new ArrayList<>();
		arLists.add(new MyMenu(R.drawable.ic_launcher, "삼성 노트북"));
		arLists.add(new MyMenu(R.drawable.btnexit, "LG 세탁기"));
		arLists.add(new MyMenu(R.drawable.toycar, "대우 마티즈"));
		
		MyCustomAdapter adapter = new MyCustomAdapter(this, R.layout.icontext, arLists);
		
		ListView listView = (ListView) findViewById(R.id.ch12_list);
		listView.setAdapter(adapter);
	}
}
